import { PipeItem } from './Pipe';

export interface ColumnFieldBase<T extends any = any> {
  componentsMap?: { [key: string]: (props: any) => React.ReactElement },
  label: string;
  value?: string;
  sorter?: boolean; // 是否开启排序
  filters?: { label: string; value: string }[];
  filterdValue?: string[]; // 筛选的受控属性，外界可用此控制筛选状态，值为已筛选的value数组
  sortOrder?: boolean | string; // 排序的受控属性，外界可用此控制列的排序 课设置为ascend descend false
  ellipsis?: boolean; // 超过宽度自动省略
  width?: string | number // 列宽度
  item?: T;
  dataSource?: { value: string, label: string, [key: string]: any }[];
  pipes?: PipeItem[];
}
